{% extends "school/layout.html" %}

{% set page_title = translate('账号设置') %}

{% block content %}
<div class="m-content">
    <form class="form-horizontal" method="POST">
        {{ form.hidden_tag() }}

        <fieldset class="fieldset">
            <legend>{{translate('账号信息')}}<a href="/school/change-password" style="color:#999;margin-left:400px;font-size:14px;">{{translate('修改密码')}}</a></legend>
            {% from "common/_formhelper.html" import render_field %}
            {{ render_field(form.name, class_="form-control", required=True) }}

            {{ render_field(form.nick_name, class_="form-control") }}

            {% from "common/_formhelper.html" import render_radio %}
            {{ render_radio(form.gender) }}

            {{ render_field(form.day_of_birth, placeholder="yyyy-mm-dd", class_="form-control", required=True, validDate=True) }}

            {% from "common/_formhelper.html" import render_email_field %}
            {{ render_email_field(form.email, placeholder=translate('请填写Email，以便我们发送培训资料等信息') , class_="form-control") }}

            {% from "common/_formhelper.html" import render_select %}
            {{ render_select(form.level) }}
            {% from "common/_formhelper.html" import render_field %}
            {#
            {{ render_field(form.old_pwd, class_="form-control", readonly=True) }}
            {{ render_field(form.new_pwd, class_="form-control", readonly=True) }}
            {{ render_field(form.confirm_pwd, class_="form-control", readonly=True) }}
            #}

            <div>
                <button class="btn btn-primary">{{translate('确认')}}</button>
            </div>
        </fieldset>
    </form>
</div>
{% endblock %}
{% block js %}
<script type="text/javascript">
$(function(){
    $('#day_of_birth').datetimepicker({
        format:'yyyy-mm-dd',
        autoclose:true,
        todayBtn:true,
        minView:2
    });
    $('.datetimepicker').css('margin-top','50px');
});
</script>
{% endblock %}
